<template>
  <wx-loading
    v-if="wxLoading"
    v-show="visible"
    :desc="desc"
  />

  <zuicool-loading
    v-else
    v-show="visible"
    :inner="inner"
    :progress="progress"
    :hideBounce="hideBounce"
  />
</template>

<script>
  import WxLoading from "./wxLoading";
  import ZuicoolLoading from "./zuicoolLoading";

  export default {
    components: {
      ZuicoolLoading,
      WxLoading
    },

    props: {
      wxLoading: {
        type: Boolean,
      },
      show: {
        type: Boolean,
      },
      desc: {
        type: String,
      },
      inner: {
        type: Boolean
      },
      progress: {
        type: [Number, String],
      },
      hideBounce: {
        type: Boolean,
      }
    },

    data() {
      return {
        // 插件用data
        visible: this.show
      }
    },

    watch: {
      show(val) {
        this.visible = val
      }
    }
  }
</script>
